package day1202zuoye;

import java.util.Arrays;

public class demo1 {
    public static void main(String[] args) {
        int arr[] = {80, 98, 87, 65, 32};
        System.out.println("排序前：" + Arrays.toString(arr));
        for (int i = 1; i < arr.length; i++) {
            for (int j = 0; j < arr.length - i; j++) {
                if (arr[j] < arr[j + 1]) {
                    int temp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = temp;
                }
            }
        }
        System.out.println("排序后：" + Arrays.toString(arr));;
    }
}
